import selight
from selenium import webdriver
import json
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait
import time
# import pyautogui
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from bs4 import BeautifulSoup
# import requests
from pathlib import Path

if __name__ == '__main__':    
    # 初始化
    chrome_option = Options()
    chrome_option.set_capability("goog:loggingPrefs", {"performance": "ALL"})
    chrome_option.add_argument("--start-maximized")
    # chrome_option.add_argument("--headless")  # 无头模式，不打开浏览器窗口
    service = Service("./chromedriver/chromedriver.exe")
    driver = webdriver.Chrome(service=service, options=chrome_option)
    driver.get("https://mp.weixin.qq.com/")
    time.sleep(10)